getText respects unbreakable whitespace on IE#91
getText respects unbreakable whitespace on IE#91cyril-sf wants to merge 2 commits intojquery:masterfrom
Conversation
|
Carriage returns should continue to be removed to make text consistent across browsers. How does removing carriage returns affect non-breaking spaces? Does it match in IE? |
|
Actually, I made a mistake, I'm going to fix it. It's not removing carriage returns that fixes the issue, but using nodeValue instead of innerText. This will look like this } else if ( typeof elem.innerText === 'string' ) { I didn't break any tests, so I didn't realize that my fix removed some useful code. |
|
I see. Are you running the Sizzle tests only? iirc, it may have been a test in jQuery. If it's not actually needed, we can remove it, but I'd like to make sure. |
|
Only the Sizzle tests. I'll check with the jQuery tests and update my commit. |
|
I ran jQuery tests after having commented the code that removes carriage returns. Nothing broke.. I'm going to keep it anyway to make sure that nothing breaks. |
This is a regression from jQuery 1.6.4.
|
I have cleaned the branch and kept the code to remove the carriage returns as discussed even though it may not be tested. |
|
I didn't push the right code in the branch initially, there's one more commit to fix a bug in my changes. |
|
You can reproduce the bug on IE using this link http://jsfiddle.net/PREjM/5/ |
|
innerText is no longer used. |
This is a regression from jQuery 1.6.4.